from webdav3.client import Client

# WebDAV服务器设置
webdav_url = "http://124.221.66.3:5244/dav"
username = "admin"
password = "wsllx@2024"

# 创建WebDAV客户端实例
client = Client(webdav_url, username=username, password=password)

# 文件路径和目标路径
local_file_path = "D:\\temp\\test.txt"
remote_file_path = "/夸克/paper/test.pdf"

# 上传文件
client.upload(local_file_path, remote_file_path)

print("文件已上传到Alist.")